package com.zilue.payment.gateway.paramter.order;

import com.zilue.payment.gateway.annotation.ParameterFiledCheck;
import com.zilue.payment.gateway.paramter.BaseParameter;
import lombok.Data;

import java.util.List;

/**
 * Created by zilue on 2017/3/7.
 */
public class CreateParameter extends BaseParameter {
    @ParameterFiledCheck(regex = "\\w{1,32}", description = "商户订单号,1-32个字符,字母/数字/_")
    private String order_no;
    @ParameterFiledCheck(regex = "\\w{1,64}", description = "卡号,1-64个字符")
    private String card_no;
    @ParameterFiledCheck(regex = "(2)|(10)", description = "诊疗卡类型 2 普通诊疗卡，10 医保卡")
    private Integer card_type;
    private String subject;
    @ParameterFiledCheck(regex = "\\d{1,11}", description = "金额长度为1-11，整数")
    private Long total_amount;
    @ParameterFiledCheck(regex = "3", description = "支付场景，固定为 3-预缴金支付")
    private Long pay_scene;
    @ParameterFiledCheck(regex = "(2)|(3)|(6)|(7)|(8)|(9)", description = "2.消费（通用） 3.挂号（医疗专用） 6.预约（医疗专用） 7.预约取号（医疗专用） 8.建档发卡（医疗专用） 9出院结算（医疗专用）")
    private Long opt_type;
    private String terminal_id;
    private String operator_id;
    private String store_id;
    private List<Goods> goods_detail;

    public String getOrder_no() {
        return order_no;
    }

    public void setOrder_no(String order_no) {
        this.order_no = order_no;
    }

    public String getCard_no() {
        return card_no;
    }

    public void setCard_no(String card_no) {
        this.card_no = card_no;
    }

    public Integer getCard_type() {
        return card_type;
    }

    public void setCard_type(Integer card_type) {
        this.card_type = card_type;
    }

    public String getSubject() {
        return subject;
    }

    public void setSubject(String subject) {
        this.subject = subject;
    }

    public Long getTotal_amount() {
        return total_amount;
    }

    public void setTotal_amount(Long total_amount) {
        this.total_amount = total_amount;
    }

    public String getTerminal_id() {
        return terminal_id;
    }

    public void setTerminal_id(String terminal_id) {
        this.terminal_id = terminal_id;
    }

    public String getOperator_id() {
        return operator_id;
    }

    public void setOperator_id(String operator_id) {
        this.operator_id = operator_id;
    }

    public String getStore_id() {
        return store_id;
    }

    public void setStore_id(String store_id) {
        this.store_id = store_id;
    }

    public List<Goods> getGoods_detail() {
        return goods_detail;
    }

    public void setGoods_detail(List<Goods> goods_detail) {
        this.goods_detail = goods_detail;
    }


    public Long getPay_scene() {
        return pay_scene;
    }

    public void setPay_scene(Long pay_scene) {
        this.pay_scene = pay_scene;
    }

    public Long getOpt_type() {
        return opt_type;
    }

    public void setOpt_type(Long opt_type) {
        this.opt_type = opt_type;
    }
}

@Data
class Goods {
    private String goods_category;
    private String goods_name;
    private String quantity;
    private String price;

}
